Skip to content

Add issue-id template variable, support multiple replacements (not just the first occurrence)#29

Open
okdas wants to merge 2 commits intodessant:mainfrom
okdas:patch-1
Open

Add issue-id template variable, support multiple replacements (not just the first occurrence)#29
okdas wants to merge 2 commits intodessant:mainfrom
okdas:patch-1

Conversation

@okdas
Copy link
Copy Markdown

@okdas okdas commented May 15, 2024

We need to programmatically generate some URLs to point to the different development dashboards (we provision new environment for each PR). issue-id variable would become handy. Will test this change in the near future.

@okdas
Copy link
Copy Markdown
Author

okdas commented May 18, 2024

Tested here: okdas/test-actions#1 (comment)

@dessant Please let me know if there's anything else needs to be done to get this in. Thanks!

@Olshansk
Copy link
Copy Markdown

@dessant Bump

@Olshansk
Copy link
Copy Markdown

Olshansk commented Jun 4, 2024

@okdas Bump #2

@okdas
Copy link
Copy Markdown
Author

okdas commented Jun 5, 2024

I've discovered this only replaces the first mention of {issue-id}, so we need to change the implementation.
pokt-network/poktroll#567 (comment)

@okdas
Copy link
Copy Markdown
Author

okdas commented Aug 2, 2024

Modified the replace() calls to use global regular expressions (/g flag) instead of string literals. This ensures all instances of {issue-author} and {issue-id} are replaced, not just the first occurrence.

Here's an example of working global replace: pokt-network/poktroll#702 (comment)

@dessant can we get this in please?

@okdas okdas changed the title Add issue-id template variable Add issue-id template variable, support multiple replacements (not just the first occurrence) Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants